package com.atguigu.srb.core.service;

import com.atguigu.srb.core.pojo.entity.UserAccount;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;
import java.util.Map;

/**
 * <p>
 * 用户账户 服务类
 * </p>
 *
 * @author lwm
 * @since 2022-02-10
 */
public interface UserAccountService extends IService<UserAccount> {

    /**
     * 提交充值，返回自动提交表单的html字符串
     * @param chargeAmt
     * @param userId
     * @return
     */
    String commitCharge(BigDecimal chargeAmt, Long userId);

    /**
     * 处理充值的异步回调
     * @param paramMap
     */
    void notify(Map<String, Object> paramMap);

    /**
     *  查询账户余额
     * @param userId
     * @return
     */
    BigDecimal getAccount(Long userId);

    /**
     * 生成用户提现提交表单
     * @param fetchAmt
     * @param userId
     * @return
     */
    String commitWithdraw(BigDecimal fetchAmt, Long userId);

    /**
     * 处理异步回调的结果
     * @param paramMap
     */
    void notifyWithdraw(Map<String, Object> paramMap);
}
